<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<script src="Bootstrap/js/jquery-1.11.1.min.js"></script>
	<style>
	    *{margin: 0;font-family: 微软雅黑;  }
        #top{  width: 100%;;  height: 140px;  background-color:#33CCCC;  }
        .top-img{  margin-left: 10px;  margin-top: 10px;  width: 40%;  height: 120px;  float: left;  }
        .jia{  float: right;  width: 25px;  margin-right: 20px;  margin-top: 20px;  }
        .qian{  font-size: 22px;  color: #FF9900;  margin-top: 25px;  margin-left: 25px;  float: left;  }
        .top-biao{  color:white;  margin-right: 10px;  padding-top: 5px;  }
        .top-ming h3{  margin-top: 20px;  margin-bottom: 18px;  }
        .jainjie{  font-size: 13px;  color: whitesmoke;  }
        .ma-img{  width:95px;  margin-top: 10px;  height: 95px;  max-width: 140px;  }
        #merchant-top{  width:100%;  height:30px;  padding-left: 10px;;  background-color: #EFEFE0;  font-size: 13px;  line-height: 30px;  }
        .merchant{  width: 100%;  }
        .img03{  width: 21%;  float: left;  }
        .img03 img{  width: 85px;  max-width:160px;  height: 85px;  margin: 10px 5px;  }
        .shops{  width: 100%;  height: 100px;  }
        .shops-ming{  width: 75%;  float: left;  height: 108px;  }
        .shops-ming span{  font-size: 14px;  color: grey;  float: right;  padding-top: 12px;  margin-right: 20px;  }
        .shops-h3{  margin-bottom:8px;  margin-top:0px;  padding-top: 15px;  margin-left: 30px;  color: black;  }
        .middle{  width: 100%;  border-bottom:3px #f8f8ff solid;  height: 108px;  }
        .top-img span{  display: block;  padding-top: 7px;  font-size: 12px;  color:lightcyan;  }
        .top-img span img{  width: 8%;  }
        .top-biao span img{  width: 4%;  }
	</style>
    <script type="text/javascript">
        $(function () {
			var id = location.href.split("?")[1];
            var url = "http://obao.tunnel.2bdata.com/business!findBusinessById.action?business.businessId="+id;
            $.post(url, function (data) {
                $(".business-name").text(data.name);
                $(".business-address").text(data.address);
                $(".business-phone").text(data.phone);
				var bImg = "http://obao.tunnel.2bdata.com/upload/business/"+data.photo;
				$("#businesImg").attr({src:bImg});
                for(var i = 0 ;i<data.products.length;i++){
					var html = "";
					var img = "http://obao.tunnel.2bdata.com/upload/product/"+data.products[i].productImg;
                   	html+=" <a href='info.html?"+data.products[i].productId+"'>";
                    html+="  <div class='middle'>";
                    html+="      <div class='shops'>";
                    html+="         <div class='img03'><img class='tupian' src="+img+" /></div>";
                    html+="         <div class='shops-ming'>";
                    html+="             <h4 class='shops-h3'>"+data.products[i].productName+"</h4>";
                    html+="             <div class='qian'>￥"+data.products[i].newPrice+"</div>";
                    html+="             <br>";
                    html+="                 <span>总销售:"+data.products[i].sales+"单</span>";
                    html+="          </div>";
                    html+="      </div>";
                    html+="   </div>";
                    html+=" </a>";
					$(".product-list").append(html);
                }
            });
        });
    </script>
</head>
<body>
<div id="top">
    <div class="top-img">
        <img id="businesImg" class="ma-img" src=""/><br>
    </div>
    <div class="top-biao">
        <span class="top-ming"><h3 class="business-name"></h3></span>
        <span class="jainjie">地址:<span class="business-address"></span> <br>电话：<span
                class="business-phone"></span></span><br>
		<span class="jainjie">热度:
			<img src="./img/xing1.png">
			<img src="./img/xing1.png">
			<img src="./img/xing1.png">
			<img src="./img/xing1.png">
			<img src="./img/xing2.png">
		</span>
    </div>
</div>
<div id="merchant-top">全部商品</div>
<!--商品-->
<div class="product-list">
</div>
</body>
</html>